<extend name="Public:base" />
<block name="title"><title>新增节点</title></block>

<block name="script">
	<script type="text/javascript">
		$(document).ready(function(){
			$('#status:checked').parents('label.btn').addClass('active');
		});
	</script>
</block>

<block name="sidebar">
	<include file="Public:sidebar" />
</block>

<block name="content">
	<div id="content" class="col-sm-8">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4 class="panel-title"><i class="glyphicon glyphicon-header"></i>添加节点 </h4>
			</div>
			<div class="panel-body">
				<form class="form-horizontal" action="{:U('Node/insert')}" method='post'>
					<div class="form-group">
						<label for="name" class="col-sm-2 control-label">名称:</label>
						<div class="col-sm-5">
							<input type="text" class="form-control" placeholder="名称" name="name" id="name" />
						</div>
						<label class="col-sm-2 control-label"></label>
					</div>
					<div class="form-group">
						<label for="title" class="col-sm-2 control-label">显示名:</label>
						<div class="col-sm-5">
							<input type="text" class="form-control" placeholder="显示名" name="title" id="title"  />
						</div>
						<label class="col-sm-2 control-label"></label>
					</div>
					<div class="form-group">
						<label for="roleName" class="col-sm-2 control-label">上级:</label>
						<div class="col-sm-3">
							<select class="form-control" name="pid">
								<option value="0">请选择</option>
								<volist name="node_tree" id="pid">
								<option value="{$pid.id}"<eq name="_GET.pid" value="$pid.id"> selected</eq>>{$pid.title_show}</option>
								</volist>
							</select>
						</div>
						<label class="col-sm-2 control-label"></label>
					</div>
					<div class="form-group">
						<label for="remark" class="col-sm-2 control-label">描述:</label>
						<div class="col-sm-5">
							<textarea class="form-control" placeholder="描述" name="remark" id="remark"></textarea>
						</div>
						<label class="col-sm-2 control-label"></label>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">状态:</label>
						<div class="btn-group col-sm-5" data-toggle="buttons">
							<label class="btn btn-primary">
								<input type="radio" checked="checked" id="status" value="1" />启用
							</label>
							<label class="btn btn-danger">
								<input type="radio" name="status" id="status" value="0" />禁用
							</label>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label"></label>
						<div class="col-sm-5">
							<button type="submit" class="btn btn-success btn-add">保存</button>
							<button type="reset" class="btn btn-default btn-add">清空</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</block>
